<template>
	<HyCard title="基本信息">
		<el-descriptions :column="3" border>
			<el-descriptions-item label="姓名">{{ basicData.expertName }}</el-descriptions-item>
			<el-descriptions-item label="手机号码">{{ basicData.expertTel }}</el-descriptions-item>
			<el-descriptions-item label="性别">{{ basicData.genderName }}</el-descriptions-item>
			<el-descriptions-item label="籍贯">{{ basicData.origin }}</el-descriptions-item>
			<el-descriptions-item label="身份证号">{{ basicData.identityNumber }}</el-descriptions-item>
			<el-descriptions-item label="民族">{{ basicData.ethnicGroupName }}</el-descriptions-item>
			<el-descriptions-item label="政治面貌">
				{{ formatteCascader(basicData.politicalLandscapeArr, political_landscape) }}
			</el-descriptions-item>
			<el-descriptions-item label="出生年月">{{ basicData.birthDate }}</el-descriptions-item>
			<el-descriptions-item label="办公电话">{{ basicData.officePhone }} </el-descriptions-item>
			<el-descriptions-item label="银行卡号">{{ basicData.bankcardNumber }}</el-descriptions-item>
			<el-descriptions-item label="开户银行">{{ basicData.accountBank }}</el-descriptions-item>
			<el-descriptions-item label="专家来源">{{ basicData.expertSourcesName }}</el-descriptions-item>
			<el-descriptions-item label="专家类别" span="3">{{ formatteCascader(basicData.expertTypeArr, expert_type) }}</el-descriptions-item>
			<el-descriptions-item label="一寸免冠照" span="3"><HyUpload :type="'view'" v-model="basicData.headlessPhotoFiles" /></el-descriptions-item>
		</el-descriptions>
	</HyCard>
	<div class="mt-5"></div>
	<HyCard title="学历信息">
		<el-descriptions :column="3" border>
			<el-descriptions-item label="毕业学校">{{ educationData.graduationSchoolName }}</el-descriptions-item>
			<el-descriptions-item label="所学专业">{{ educationData.majorsStudiedName }}</el-descriptions-item>
			<el-descriptions-item label="学历">{{ educationData.educationName }}</el-descriptions-item>
			<el-descriptions-item label="学位">{{ educationData.academicDegreeName }}</el-descriptions-item>
			<el-descriptions-item label="是否留学" span="3">{{ educationData.isStudyName }}</el-descriptions-item>
			<el-descriptions-item span="3" v-if="educationData.isStudyName === '是'" label="留学学校名称">{{
				educationData.isStudySchool
			}}</el-descriptions-item>
			<el-descriptions-item span="3" label="毕业证书">
				<HyUpload :type="'view'" v-model="educationData.diplomaFiles" />
			</el-descriptions-item>
			<el-descriptions-item span="3" label="学位证书">
				<HyUpload :type="'view'" v-model="educationData.degreeCertificateFiles"
			/></el-descriptions-item>
		</el-descriptions>
	</HyCard>
	<div class="mt-5"></div>
	<HyCard title="职业信息">
		<el-descriptions :column="2" border>
			<el-descriptions-item label="工作单位统一社会信用代码">{{ careerData.unifiedSocialCreditcode }}</el-descriptions-item>
			<el-descriptions-item label="工作单位">{{ careerData.workPlace }}</el-descriptions-item>
			<el-descriptions-item label="工作开始时间">{{ careerData.workStartTime }}</el-descriptions-item>
			<el-descriptions-item label="工作年限">{{ careerData.yearsOfService }}</el-descriptions-item>
			<el-descriptions-item label="在职状态">{{ careerData.incumbentStatusName }}</el-descriptions-item>
			<el-descriptions-item label="退休时间" v-if="careerData.incumbentStatusName === '退休'">{{ careerData.timeOfRetirement }}</el-descriptions-item>
			<el-descriptions-item label="职称">{{ careerData.jobTitleName }}</el-descriptions-item>
			<el-descriptions-item label="职级">{{ careerData.jobLevel }}</el-descriptions-item>
			<el-descriptions-item label="职务" span="2">{{ careerData.office }}</el-descriptions-item>
			<el-descriptions-item label="工作经历" span="2">{{ careerData.workExperience }}</el-descriptions-item>
			<el-descriptions-item label="项目经历" span="2">{{ careerData.projectExperience }}</el-descriptions-item>
		</el-descriptions>
	</HyCard>
	<div class="mt-5"></div>
	<HyCard title="专业信息">
		<el-descriptions :column="2" border>
			<el-descriptions-item label="擅长行业领域">{{ expertiseData.industryFieldsName }}</el-descriptions-item>
			<el-descriptions-item label="	擅长专业领域">{{ expertiseData?.professionalFieldsName }}</el-descriptions-item>
			<el-descriptions-item label="表彰奖励">{{ expertiseData?.recognitionRewards }}</el-descriptions-item>
			<el-descriptions-item label="擅长方向">{{ expertiseData?.direction }}</el-descriptions-item>
			<el-descriptions-item label="回避单位" span="2">{{
				expertiseData.avoidanceUnitsArr && expertiseData.avoidanceUnitsArr.length > 0 ? expertiseData.avoidanceUnitsArr.join() : ''
			}}</el-descriptions-item>
			<el-descriptions-item label="职称证明" span="2"
				><HyUpload :type="'view'" v-model="expertiseData.professionalTitleFiles"
			/></el-descriptions-item>
			<el-descriptions-item label="其他证明资料" span="2"><HyUpload :type="'view'" v-model="expertiseData.otherProofFiles" /></el-descriptions-item>
		</el-descriptions>
	</HyCard>
</template>
<script setup lang="ts">
import HyCard from '/@/components/HyCard/index.vue';
import HyUpload from '/@/components/HyUpload/index.vue';
import { formatteCascader } from '/@/utils/hyFunc';
import { useTreeDict } from '/@/hooks/dict';

const { expert_type, political_landscape } = useTreeDict('expert_type', 'political_landscape');

const props = defineProps({
	basicData: {
		default: () => ({}),
		type: Object,
	},
	careerData: {
		default: () => ({}),
		type: Object,
	},
	educationData: {
		default: () => ({}),
		type: Object,
	},
	expertiseData: {
		default: () => ({}),
		type: Object,
	},
});

const { basicData, careerData, educationData, expertiseData } = toRefs(props);

//编辑
</script>
<style scoped lang="scss">
:deep(.el-descriptions__label) {
	width: 10% !important;
}
</style>
